﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Bids.Core.Infrastructure;
using Telerik.OpenAccess.Metadata;
using Telerik.OpenAccess.Metadata.Fluent;

namespace Bids.Core.DomainObjects
{
     [Serializable]
    public class Plane : IEntity
    {
        /// <summary>
        /// id
        /// </summary>
        public virtual int ID { set; get; }
        /// <summary>
        /// 用户id
        /// </summary>
        public virtual int UserId { set; get; }
        /// <summary>
        /// 标志设计
        /// </summary>
        public virtual int Sign { set; get; }
        /// <summary>
        /// 品牌设计
        /// </summary>
        public virtual int Brand { set; get; }
        /// <summary>
        /// 卡通形象
        /// </summary>
        public virtual int Cartoon { set; get; }
        /// <summary>
        /// 宣传海报
        /// </summary>
        public virtual int Posters { set; get; }
        /// <summary>
        /// 企业画册
        /// </summary>
        public virtual int PictureAlbum { set; get; }
        /// <summary>
        /// 包装设计
        /// </summary>
        public virtual int Pacr { set; get; }
        /// <summary>
        /// 广告招牌
        /// </summary>
        public virtual int ShopSign { set; get; }

        /// <summary>
        /// 网页设计
        /// </summary>
        public virtual int Web { set; get; }
        /// <summary>
        /// Flash制作
        /// </summary>
        public virtual int Flash { set; get; }
        /// <summary>
        /// 界面设计
        /// </summary>
        public virtual int Interface { set; get; }
        /// <summary>
        /// 整站设计
        /// </summary>
        public virtual int AllWeb { set; get; }
        /// <summary>
        /// Banner
        /// </summary>
        public virtual int Banner { set; get; }
        /// <summary>
        /// 淘宝店装修
        /// </summary>
        public virtual int TaoBao { set; get; }
        /// <summary>
        /// 程序开发
        /// </summary>
        public virtual int Order { set; get; }
        /// <summary>
        /// 网站改版
        /// </summary>
        public virtual int WebUpdate { get; set; }
        public static MappingConfiguration<Plane> CreateConfiguration()
        {
            var threadMapping = new MappingConfiguration<Plane>();
            threadMapping.MapType(t => new
            {
                t.ID,
                t.UserId,
                t.Sign,
                t.Brand,
                t.Cartoon,
                t.Posters,
                t.PictureAlbum,
                t.Pacr,
                t.ShopSign,
                t.Web,
                t.Flash,
                t.Interface,
                t.AllWeb,
                t.Banner,
                t.TaoBao,
                t.Order,
                t.WebUpdate
            }).ToTable("Plane");
            threadMapping.HasProperty(t => t.ID).IsIdentity(KeyGenerator.Autoinc);

            return threadMapping;
        }
    }
}
